﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Linq.Mapping;
using System.Diagnostics;

namespace DomainModel
{
    [Table(Name = "main.Product")]
    public partial class Product
    {
        #region int AccessCount

        private int _accessCount;
        [DebuggerNonUserCode]
        [Column(Storage = "_accessCount", Name = "AccessCount", DbType = "int", CanBeNull = false)]
        public int AccessCount
        {
            get
            {
                return _accessCount;
            }
            set
            {
                if (value != _accessCount)
                {
                    _accessCount = value;
                }
            }
        }

        #endregion

        #region int CategoryID

        private int _categoryID;
        [DebuggerNonUserCode]
        [Column(Storage = "_categoryID", Name = "CategoryID", DbType = "int", CanBeNull = false)]
        public int CategoryID
        {
            get
            {
                return _categoryID;
            }
            set
            {
                if (value != _categoryID)
                {
                    _categoryID = value;
                }
            }
        }

        #endregion

        #region System.DateTime CreateTime

        private System.DateTime _createTime;
        [DebuggerNonUserCode]
        [Column(Storage = "_createTime", Name = "CreateTime", DbType = "datetime", CanBeNull = false)]
        public System.DateTime CreateTime
        {
            get
            {
                return _createTime;
            }
            set
            {
                if (value != _createTime)
                {
                    _createTime = value;
                }
            }
        }

        #endregion

        #region string Detail

        private string _detail;
        [DebuggerNonUserCode]
        [Column(Storage = "_detail", Name = "Detail", DbType = "text", CanBeNull = false)]
        public string Detail
        {
            get
            {
                return _detail;
            }
            set
            {
                if (value != _detail)
                {
                    _detail = value;
                }
            }
        }

        #endregion

        #region int? ID

        private int? _id;
        [DebuggerNonUserCode]
        [Column(Storage = "_id", Name = "ID", DbType = "INTEGER", IsPrimaryKey = true, IsDbGenerated = true)]
        public int? ID
        {
            get
            {
                return _id;
            }
            set
            {
                if (value != _id)
                {
                    _id = value;
                }
            }
        }

        #endregion

        #region string ImageUrl

        private string _imageUrl;
        [DebuggerNonUserCode]
        [Column(Storage = "_imageUrl", Name = "ImageUrl", DbType = "nvarchar(256)", CanBeNull = false)]
        public string ImageUrl
        {
            get
            {
                return _imageUrl;
            }
            set
            {
                if (value != _imageUrl)
                {
                    _imageUrl = value;
                }
            }
        }

        #endregion

        #region string Model

        private string _model;
        [DebuggerNonUserCode]
        [Column(Storage = "_model", Name = "Model", DbType = "nvarchar(64)", CanBeNull = false)]
        public string Model
        {
            get
            {
                return _model;
            }
            set
            {
                if (value != _model)
                {
                    _model = value;
                }
            }
        }

        #endregion

        #region decimal Price

        private decimal _price;
        [DebuggerNonUserCode]
        [Column(Storage = "_price", Name = "Price", DbType = "decimal", CanBeNull = false)]
        public decimal Price
        {
            get
            {
                return _price;
            }
            set
            {
                if (value != _price)
                {
                    _price = value;
                }
            }
        }

        #endregion

        #region string ProductName

        private string _productName;
        [DebuggerNonUserCode]
        [Column(Storage = "_productName", Name = "ProductName", DbType = "nvarchar(64)", CanBeNull = false)]
        public string ProductName
        {
            get
            {
                return _productName;
            }
            set
            {
                if (value != _productName)
                {
                    _productName = value;
                }
            }
        }

        #endregion

        #region int Rank

        private int _rank;
        [DebuggerNonUserCode]
        [Column(Storage = "_rank", Name = "Rank", DbType = "int", CanBeNull = false)]
        public int Rank
        {
            get
            {
                return _rank;
            }
            set
            {
                if (value != _rank)
                {
                    _rank = value;
                }
            }
        }

        #endregion

        #region bool Recommend

        private bool _recommend;
        [DebuggerNonUserCode]
        [Column(Storage = "_recommend", Name = "Recommend", DbType = "bit", CanBeNull = false)]
        public bool Recommend
        {
            get
            {
                return _recommend;
            }
            set
            {
                if (value != _recommend)
                {
                    _recommend = value;
                }
            }
        }

        #endregion

    }
}
